<template>
<view>
<!-- <loading v-if="!show">加载中...</loading> -->
<view class="page" v-if="show">
    <view class="fui-list-group" v-for="(item, index) in list" :key="index">
        <navigator class="fui-list goods-item" openType="redirect" :url="'/pages/goods/package/detail/index?id=' + item.id">
            <view class="fui-list-media">
                <image class="goods_img" :src="item.thumb"></image>
            </view>
            <view class="fui-list-inner">
                <view class="name">{{item.title}}</view>
                <view class="orderprice">商品总价：<span>¥{{item.goodsprice}}</span>
                </view>
                <view class="price">
                    <span class="text">套餐价：¥{{item.price}}</span>
                </view>
            </view>
            <view class="fui-list-angle">
                <view class="angle"></view>
            </view>
        </navigator>
        <view class="fui-cell-group fui-comment-group">
            <view id="package">
                <navigator hoverClass="none" id="package_list" openType="redirect" :style="'width:' + (item.goods.length*220-20) + 'rpx'" :url="'/pages/goods/package/detail/index?id=' + item.id">
                    <view class="package-goods package-goods3" v-for="(item2, index2) in item.goods" :key="index2">
                        <image class="package-goods-img" :src="item2.thumb"></image>
                        <p>{{item2.title}}</p>
                        <text class="icox icox-tianjiazhuanhuan"></text>
                    </view>
                </navigator>
            </view>
        </view>
    </view>
    <menus :route='route' :icons="icons" :cartcount="cartcount"></menus>
</view>
</view>
</template>

<script>
var n = getApp().globalData,
    o = n.requirejs("core");
n.requirejs("icons"), n.requirejs("jquery");
import menus from "@/pages/common/menu.vue"
export default {
  data() {
    return {
      show: !0,
      list: "",
	  icons: {},
	  cartcount: ''
    };
  },

  components: {menus},
  props: {},
  onLoad: function (n) {
    var e = this;
    o.get("package.get_list", {
      goodsid: n.id
    }, function (n) {
      e.setData({
        list: n.list
      });
	  console.log(e)
    });
  },
  onReady: function () {},
  onShow: function () {},
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {},
  onShareAppMessage: function () {},
  methods: {}
};
</script>
<style>
@import "./index.css";
</style>